package com.itheima.d1_num1;

public class Fruit {
    private String name;//名称
    private String origin;//产地
    private double price;// 单价

    public void bloom(){
        System.out.println("正在开花");
    }

    public void bearFruit(){
        System.out.println("正在结果");
    }
    public void bePicked(){
        System.out.println("正在被采摘");
    }












    public Fruit() {
    }

    public Fruit(String name, String origin, double price) {
        this.name = name;
        this.origin = origin;
        this.price = price;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return origin
     */
    public String getOrigin() {
        return origin;
    }

    /**
     * 设置
     * @param origin
     */
    public void setOrigin(String origin) {
        this.origin = origin;
    }

    /**
     * 获取
     * @return price
     */
    public double getPrice() {
        return price;
    }

    /**
     * 设置
     * @param price
     */
    public void setPrice(double price) {
        this.price = price;
    }

    public String toString() {
        return "Fruit{name = " + name + ", origin = " + origin + ", price = " + price + "}";
    }
}
